import { createRouter, createWebHashHistory } from "vue-router";

const router = createRouter({
  history: createWebHashHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: "/",
      name: "login",
      component: () => import("@/views/LoginView.vue"),
    },
    {
      path: "/home",
      name: "home",
      component: () => import("@/views/HomeView.vue"),
      children: [
        {
          path: "main",
          name: "main",
          component: () => import('@/views/home/MainView.vue')
        },
        {
          path: "manage",
          name: "manage",
          component: () => import('@/views/home/InterfaceManage.vue')
        },
        {
          path: "analyze",
          name: "analyze",
          component: () => import('@/views/home/interfaceAnalyze.vue')
        }
      ],
      redirect: '/home/main',
    }
  ],
});

export default router;
